<template>
  <div class="cell">
    <div class="cell-label">{{ label }}</div>
    <div class="cell-input">
      <el-input
        v-model="value"
        :placeholder="placeholder"
        size="mini"
        :type="type"
        @input="input" />
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value: ''
      }
    },
    props: {
      label: {
        type: String,
        default: 'label'
      },
      placeholder: {
        type: String | Number,
        default: '请输入'
      },
      type: {
        type: String,
        default: 'text'
      }
    },
    methods: {
      input() {
        this.$emit('input', this.value)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .cell{
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 0 16px;
    .cell-label{
      width: 120px;
      margin-right: 12px;
      color: #646566;
      font-size: 15px;
    }
    .cell-input{
      flex: 1;
      .el-input{
        ::v-deep{
          .el-input__inner{
            border: none;
            padding: 0;
            font-size: 14px;
          }
        }
      }
    }
  }
</style>
